<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<script type="text/javascript">
    function changeLanguage(language) {
        var url = '${"changeLanguageOfLoginSession.do?sessionLanguage=' + language + '"}';
        $.post(url, function (data) {
            window.location.replace('home.do');
        });
    }
</script>
<div id="header-wrapper">
    <div id="header">
        <img id="logo-eslims" width="128px" height="128px" src="${pageContext.request.contextPath}/images/cgrlogo.gif"/>
        <img id="logo" src="${pageContext.request.contextPath}/images/logo.png"/>

        <div id="title">
            <s:property value="@lk.icta.common.AppConstants@APPLICATION_NAME_SI"/> </br>
            <s:label cssStyle="font-size:15" name="@lk.icta.common.AppConstants@APPLICATION_NAME_TA"/> </br>
            <s:property value="@lk.icta.common.AppConstants@APPLICATION_NAME_EN"/>
        </div>
        <div class="buttons">
            <%--<img class="getLang" src="${pageContext.request.contextPath}/images/get_ta.png"/>
            <img class="getLang" src="${pageContext.request.contextPath}/images/get_si.png"/>--%>


            <a href="http://siyabas.lk/tamil_how_to_install_in_english.html"
               target="_blank">
                <img class="getLang" src="${pageContext.request.contextPath}/images/get_ta.png"/>

            </a>
            <a href="http://siyabas.lk/sinhala_how_to_install.html"
               target="_blank">
                <img class="getLang" src="${pageContext.request.contextPath}/images/get_si.png"/></a>

            <a href="${pageContext.request.contextPath}/lib/keyboard/t1.html"
               target="_blank">
                <img class="getLang" alt="Sinhala Keyboard" src="${pageContext.request.contextPath}/images/sin_keyboard.jpg"/>
            </a>
                <a href="${pageContext.request.contextPath}/lib/keyboard/OnlineUnicodeKeyboard.html"
                               target="_blank">
                                <img class="getLang" alt="Sinhala Keyboard" src="${pageContext.request.contextPath}/images/sin_keyboard.jpg"/>
                            </a>


        </div>
        <s:if test="user.loginState.toString() == 'NORMAL'">
            <div class="buttons font11">
                <div class="lang" onclick="changeLanguage('si')">සිංහල</div>
                <div class="lang" onclick="changeLanguage('ta')">தமிழ்</div>
                <div class="lang" onclick="changeLanguage('en')">English</div>
            </div>
        </s:if>
    </div>
</div>
<div id="menu-wrapper">
    <div id="menu">
        <span style="float: left;"><s:property value="userBranchName"/></span>
        <s:a href="logout.do"><s:label value="%{getText('logout.label')}"/></s:a>
        <s:if test="user != null">  <span><s:label value="%{getText('welcome.label')}"/> <s:property
                value="user.username"/> | <s:property
                value="user.role.id"/> !</span>
        </s:if>
    </div>
</div>